﻿using System;

namespace LEE.AspNetCore.Extensions
{
    public class ApiResult
    {
        public ApiResult()
        {
            Success = true;
        }

        /// <summary>
        /// 自定义响应代码
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        /// 结果是否成功
        /// </summary>
        public bool Success { set; get; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string Message { get; set; }
    }

    public class ApiResult<T> : ApiResult
    {
        public T Result { get; set; }
    }
}
